﻿<%@ Page Title="" ValidateRequest="false" Language="C#" MasterPageFile="~/Admin/Admin.Master"
    AutoEventWireup="true" CodeBehind="CreateDoc.aspx.cs" Inherits="TimeAxis.Admin.Manager.CreateDoc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <link rel="stylesheet" href="/Scripts/kindeditor/themes/default/default.css" />
    <link rel="stylesheet" href="/Scripts/kindeditor/plugins/code/prettify.css" />
    <script type="text/javascript" src="/Scripts/kindeditor/kindeditor-all-min.js"></script>
    <script type="text/javascript" src="/Scripts/kindeditor/lang/zh_CN.js"></script>
    <script type="text/javascript" src="/Scripts/kindeditor/plugins/code/prettify.js"></script>
    <script type="text/javascript" src="/Scripts/jquery-1.4.1.min.js"></script>
    <script type="text/javascript">
        var editor1
        KindEditor.ready(function (K) {
            editor1 = K.create('#MainContent_TextBox1', {
                cssPath: '/js/plugins/code/prettify.css',
                uploadJson: '/Admin/Manager/upload_json.ashx',
                fileManagerJson: '/Admin/Manager/file_manager_json.ashx',
                allowFileManager: true,
                afterCreate: function () {
                    var self = this;
                    K.ctrl(document, 13, function () {
                        self.sync();
                        K('form[name=Form1]')[0].submit();
                    });
                    K.ctrl(self.edit.doc, 13, function () {
                        self.sync();
                        K('form[name=Form1]')[0].submit();
                    });
                }
            });
            prettyPrint();
        });
    </script>
    <h2>
        新建百科
    </h2>
    <span class="failureNotification">
        <asp:Literal ID="FailureText" runat="server"></asp:Literal>
    </span>
    <div class="accountInfo" style="width: 100%;">
        <fieldset class="login" style="width: 96%;">
            <legend>新建百科</legend>
            <p>
                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">百科标题:</asp:Label>
                <asp:TextBox ID="UserName" runat="server" CssClass="textEntry" Style="width: 100%;"></asp:TextBox>
            </p>
            <p>
                <asp:Label ID="Label2" runat="server" AssociatedControlID="UserName">百科分类:</asp:Label>
                <%
                    foreach (TimeAxis.Models.Category c in categorys)
                    {
                        Response.Write("<input type=\"checkbox\" name=\"querycategory\" value=\"" + c.Id + "\" />" + c.CName + "&nbsp;&nbsp;&nbsp;&nbsp;");
                    }
                %>
            </p>
            <p>
                <asp:Label ID="Label1" runat="server" AssociatedControlID="UserName">百科内容:</asp:Label>
                <asp:TextBox ID="TextBox1" runat="server" CssClass="textEntry" Style="width: 100%;
                    height: 600px;"></asp:TextBox>
            </p>
            <p class="submitButton">
                <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="确定" OnClick="LoginButton_Click"
                    ValidationGroup="LoginUserValidationGroup" />
            </p>
        </fieldset>
    </div>
</asp:Content>
